import request from '@/utils/request'

export function getTransfers(data, offset, limit) {
  return request({
    url: '/transfer',
    method: 'get',
    params: {
      userId: data.userId,
      begin: data.begin,
      end: data.end,
      offset: offset,
      limit: limit
    }
  })
}

export function addTransfer(data) {
  return request({
    url: '/transfer',
    method: 'post',
    data
  })
}

export function addMyTransfer(data) {
  return request({
    url: '/transfer/mine',
    method: 'post',
    data
  })
}

export function passTransfer(id, status) {
  return request({
    url: `/transfer/status/${id}?status=${status}`,
    method: 'put'
  })
}
